<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 导入依赖 -->
    <script src='https://unpkg.com/@antv/l7'></script>
    <script src="https://lib.baomitu.com/jquery/2.2.4/jquery.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0
        }

        #map {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            background-color: rgba(255, 0, 0, 0.565);
        }
    </style>
</head>

<body>
    <div id="map">

    </div>
    <script>
        /* Scene场景 -L7不提供地图,只专注于地理数据可视化
        Scene 
        1、Map
        2、Layer
         */
        const scene = new L7.Scene({
            /* 设置场景的挂载点 */
            id: "map",
            map: new L7.GaodeMap({
                style: "dark",
                center: [114.30, 30.50],
                pitch: 60,
                /* zoom可以实现放大和缩小级别 */
                zoom: 8
            }),
            logoVisible: false
        })
        var data = {
            "type": "FeatureCollection",
            "features": [
                {
                    "type": "Feature",
                    "properties": { "h": 100 },
                    "geometry": {
                        "type": "Point",
                        "coordinates": [114.439503, 30.613218],

                    }
                },
                {
                    "type": "Feature",
                    "properties": { "h": 200, },
                    "geometry": {
                        "type": "Point",
                        "coordinates": [114.316636, 30.539607],

                    }
                },
                {
                    "type": "Feature",
                    "properties": { "h": 300 },
                    "geometry": {
                        "type": "Point",
                        "coordinates": [114.44172, 30.512056],

                    }
                }
            ]
        }
        scene.on("loaded", () => {
            var point_layer = new L7.PointLayer();
            point_layer
                .source(data)
                .animate(true)
                .active(true)
                .shape('cylinder')
                .size("h", h => {
                    return [10, h]
                })
                .color("#652e80")
            scene.addLayer(point_layer)
        })
    </script>
</body>

</html>